package day08;

import java.util.HashMap;
import java.util.Map;

public class Student {
    private Map<String, Integer> studentScores;

    public Student() {
        studentScores = new HashMap<>();
    }


    public void addStudentScore(String studentId, int score) {
        studentScores.put(studentId, score);
    }


    public Integer getStudentScore(String studentId) {
        return studentScores.get(studentId);
    }


    public void deleteStudentScore(String studentId) {
        studentScores.remove(studentId);
    }


    public void printAllStudentScores() {
        for (Map.Entry<String, Integer> entry : studentScores.entrySet()) {
            System.out.println("Student ID: " + entry.getKey() + ", Score: " + entry.getValue());
        }
    }

    public static void main(String[] args) {

        Student manager = new Student();


        manager.addStudentScore("001", 90);
        manager.addStudentScore("002", 85);
        manager.addStudentScore("003", 95);


        System.out.println("Score for student 002: " + manager.getStudentScore("002"));


        manager.deleteStudentScore("001");

        System.out.println("All student scores:");
        manager.printAllStudentScores();
    }
}
